package net.pierrerenaudin.blobbyvolley.client;

public class Ball {

	public static final double BALL_RADIUS = 31.5;
	
	public boolean down;
	
	public Vector velocity;
	public Vector position;
	public boolean hitByRightPlayer;
	public boolean hitByLeftPlayer;
	
	public Ball(){
		velocity = new Vector(0.0,0.0);
		position = new Vector(0.0,0.0);
	}
	
	public void setHitPlayer(Player player,boolean hitByPlayer){
		if(player.side == Player.LEFT_PLAYER){
			hitByLeftPlayer = hitByPlayer;
		}
		else if(player.side == Player.RIGHT_PLAYER){
			hitByRightPlayer = hitByPlayer;
		}
	}
	
	public boolean hitPlayer(Player player){
		if(player.side == Player.LEFT_PLAYER){
			return hitByLeftPlayer;
		}
		else if(player.side == Player.RIGHT_PLAYER){
			return hitByRightPlayer;
		}
		return false;
	}
	
}
